# Maintainer: Alexander F. Rødseth <xyproto@archlinux.org>
# Contributor: Mosra <mosra@centrum.cz>

# An up-to-date version of this PKGBUILD is maintained at
# https://github.com/mosra/corrade/blob/master/package/archlinux/corrade/PKGBUILD

pkgname=corrade
pkgver=2020.06
pkgrel=1
pkgdesc='C++11/C++14 multiplatform utility library'
arch=(x86_64)
url='https://magnum.graphics/corrade/'
license=(MIT)
makedepends=(cmake git ninja)
source=("git+https://github.com/mosra/corrade#tag=v$pkgver")
sha256sums=('SKIP')

build() {
  mkdir -p build
  cd build
  cmake "$srcdir/corrade" \
    -D CMAKE_BUILD_TYPE=Release \
    -D CMAKE_INSTALL_PREFIX=/usr \
    -G Ninja
  ninja
}

package() {
  DESTDIR="$pkgdir" ninja -C build install
  install -Dm644 corrade/COPYING \
    "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}

# getver: github.com/mosra/corrade/releases/latest
# vim: ts=2 sw=2 et:
